<template>
	<view>
		<view class="content">
		    <ren-calendar ref='ren' :markDays='markDays' :headerBar='true' @onDayClick='onDayClick'></ren-calendar>
		    <view class="change">选中日期：{{curDate}}</view>
		</view>
	</view>
</template>

<script>
 import RenCalendar from '@/components/ren-calendar/ren-calendar.vue'
    export default {
        components:{
            RenCalendar
        },
        data() {
            return {
                curDate:'',
                markDays:['2025-05-18','2025-05-19']
            }
        },
        onReady() {
            let today = this.$refs.ren.getToday().date;
            this.curDate = today;
            this.markDays.push(today);
        },
        methods: {
            onDayClick(data){
                this.curDate = data.date;
            }
        }
    }
</script>

<style lang="scss">

</style>
